package com.ruoyi.consumer.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.consumer.mapper.CFillingFacilitMapper;
import com.ruoyi.consumer.domain.CFillingFacilit;
import com.ruoyi.consumer.service.ICFillingFacilitService;

/**
 * 加注机Service业务层处理
 * 
 * @author YFENTEST
 * @date 2023-11-28
 */
@Service
public class CFillingFacilitServiceImpl implements ICFillingFacilitService 
{
    @Autowired
    private CFillingFacilitMapper cFillingFacilitMapper;

    /**
     * 查询加注机
     * 
     * @param facilitId 加注机主键
     * @return 加注机
     */
    @Override
    public CFillingFacilit selectCFillingFacilitByFacilitId(Integer facilitId)
    {
        return cFillingFacilitMapper.selectCFillingFacilitByFacilitId(facilitId);
    }

    /**
     * 查询加注机列表
     * 
     * @param cFillingFacilit 加注机
     * @return 加注机
     */
    @Override
    public List<CFillingFacilit> selectCFillingFacilitList(CFillingFacilit cFillingFacilit)
    {
        return cFillingFacilitMapper.selectCFillingFacilitList(cFillingFacilit);
    }

    /**
     * 新增加注机
     * 
     * @param cFillingFacilit 加注机
     * @return 结果
     */
    @Override
    public int insertCFillingFacilit(CFillingFacilit cFillingFacilit)
    {
        cFillingFacilit.setCreateTime(DateUtils.getNowDate());
        return cFillingFacilitMapper.insertCFillingFacilit(cFillingFacilit);
    }

    /**
     * 修改加注机
     * 
     * @param cFillingFacilit 加注机
     * @return 结果
     */
    @Override
    public int updateCFillingFacilit(CFillingFacilit cFillingFacilit)
    {
        cFillingFacilit.setUpdateTime(DateUtils.getNowDate());
        return cFillingFacilitMapper.updateCFillingFacilit(cFillingFacilit);
    }

    /**
     * 批量删除加注机
     * 
     * @param facilitIds 需要删除的加注机主键
     * @return 结果
     */
    @Override
    public int deleteCFillingFacilitByFacilitIds(Integer[] facilitIds)
    {
        return cFillingFacilitMapper.deleteCFillingFacilitByFacilitIds(facilitIds);
    }

    /**
     * 删除加注机信息
     * 
     * @param facilitId 加注机主键
     * @return 结果
     */
    @Override
    public int deleteCFillingFacilitByFacilitId(Integer facilitId)
    {
        return cFillingFacilitMapper.deleteCFillingFacilitByFacilitId(facilitId);
    }
}
